
package com.yy.permissions_general.common.config.exception.base;


import com.yy.permissions_general.common.constant.StatusEnum;

public class ServiceException extends RuntimeException {
    /**
     * 异常吗
     */
    private Integer code;
    private String msg;

    public ServiceException(StatusEnum statusEnum) {
        this.code = statusEnum.getCode();
        this.msg = statusEnum.getMessage();
    }

    public ServiceException(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
